package Interface;

import Animation.BoardAnimPanel;
import com.sun.opengl.util.Animator;
import java.awt.Color;
import java.awt.GridLayout;
import javax.media.opengl.GLCapabilities;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.border.Border;

public class WestPanel extends JPanel implements Runnable 
{

    static Animator anim;
    BoardAnimPanel animPanel;
    GLCapabilities capabilities;

    /*
     * The West Panel is a container for the openGL animation panel.
     */
    public WestPanel()
    {
        capabilities = new GLCapabilities();
        animPanel = new BoardAnimPanel(capabilities);
        
        Border whiteLine = BorderFactory.createLineBorder(Color.white,5);
        setBorder(whiteLine);
        setBackground(Color.darkGray);
        setSize(700,700);
        setLayout(new GridLayout(1,1));
        add(animPanel);

        Thread beginAnimation = new Thread(this);
        beginAnimation.start();

    }

    public void run() {
        anim = new Animator(animPanel);
        anim.start();
    }


}